package com.alibaba.citrus.cr.mn.order.center.facade.function.convert;

import com.epoch.app.mnordercenter.model.dto.OrderBizQueryResponse;
import com.epoch.app.mnordercenter.model.dto.OrderSDO;

/**
 * @author zhoubc
 * @date 2023/5/28 15:36
 */
public class OrderSDOToOrderBizQueryResponseConvertor {

    public static OrderBizQueryResponse convert(OrderSDO orderSDO){
        OrderBizQueryResponse orderBizQueryResponse = new OrderBizQueryResponse();
        if(orderSDO == null){
            return orderBizQueryResponse;
        }
        orderBizQueryResponse.setId(orderSDO.getId());
        orderBizQueryResponse.setOrderBizId(orderSDO.getOrderBizId());
        orderBizQueryResponse.setOuterId(orderSDO.getOuterOrderId());
        orderBizQueryResponse.setOrderType(orderSDO.getOrderType());
        orderBizQueryResponse.setOrderTypeName(orderSDO.getOrderTypeName());
        orderBizQueryResponse.setOrderTag(orderSDO.getOrderTag());
        orderBizQueryResponse.setOrderStatus(orderSDO.getOrderStatus());
        orderBizQueryResponse.setCustomerCode(orderSDO.getCustomerCode());
        orderBizQueryResponse.setCustomerName(orderSDO.getCustomerName());
        orderBizQueryResponse.setReceiveAddressCode(orderSDO.getReceiveAddressCode());
        orderBizQueryResponse.setReceiveAddressName(orderSDO.getReceiveAddressName());
        orderBizQueryResponse.setAddressName(orderSDO.getReceiveAddressName());
        orderBizQueryResponse.setAreaCode(orderSDO.getAreaCode());
        orderBizQueryResponse.setBisUnitCode(orderSDO.getBisUnitCode());
        orderBizQueryResponse.setBisUnitName(orderSDO.getBisUnitName());
        orderBizQueryResponse.setSalesOrganization(orderSDO.getSalesOrganization());
        orderBizQueryResponse.setSalesOrganizationName(orderSDO.getSalesOrganizationName());
//        orderBizQueryResponse.setSalesChannel(orderSDO.getSalesChannel());
//        orderBizQueryResponse.setSalesChannelName(orderSDO.getSalesChannelName());
//        orderBizQueryResponse.setSalesDepartment(orderSDO.getSalesDepartment());
//        orderBizQueryResponse.setSalesDepartmentName(orderSDO.getSalesDepartmentName());
        orderBizQueryResponse.setBuzChannel(orderSDO.getBizChannel());
        orderBizQueryResponse.setBuzChannelName(orderSDO.getBizChannelName());
        orderBizQueryResponse.setCostCenter(orderSDO.getCostCenter());
        orderBizQueryResponse.setCashCustomerName(orderSDO.getCashCustomerName());
        orderBizQueryResponse.setCustomerRefNo(orderSDO.getCustomerReferenceNo());
        orderBizQueryResponse.setCustomerRefDate(orderSDO.getCustomerExpectDate());
        orderBizQueryResponse.setGoodsGroupCode(orderSDO.getProductGroupCode());
        orderBizQueryResponse.setGoodsGroupName(orderSDO.getProductGroupName());
        orderBizQueryResponse.setSalesmanId(orderSDO.getSalesmanId());
        orderBizQueryResponse.setSalesmanName(orderSDO.getSalesmanName());
        orderBizQueryResponse.setOrderTime(orderSDO.getGmtCreate());
        orderBizQueryResponse.setCreatorId(orderSDO.getCreatorId());
        orderBizQueryResponse.setCreator(orderSDO.getCreator());
        orderBizQueryResponse.setUpdateTime(orderSDO.getGmtModified());
        orderBizQueryResponse.setUpdator(orderSDO.getUpdator());
        orderBizQueryResponse.setOrderReason(orderSDO.getCreateReason());
        orderBizQueryResponse.setOrderReasonName(orderSDO.getCreateReasonName());
        orderBizQueryResponse.setDeliveryMethod(orderSDO.getDeliveryMethod());
        orderBizQueryResponse.setDeliveryMethodName(orderSDO.getDeliveryMethodName());
        orderBizQueryResponse.setContact(orderSDO.getContact());
        orderBizQueryResponse.setContactPhone(orderSDO.getContactPhone());
        orderBizQueryResponse.setCustomerAccounts(orderSDO.getCustomerAccounts());
        orderBizQueryResponse.setOrderTotalFee(orderSDO.getOrderTotalFee());
        orderBizQueryResponse.setFrontOrderId(orderSDO.getFrontOrderId());
        orderBizQueryResponse.setFrontOrderBizId(orderSDO.getFrontOrderBizId());
        orderBizQueryResponse.setAllocateOrderId(orderSDO.getAllocateOrderId());
        orderBizQueryResponse.setAllocateOrderBizId(orderSDO.getAllocateOrderBizId());
        orderBizQueryResponse.setDeliveryAmount(orderSDO.getDeliveryAmount());
        orderBizQueryResponse.setShippingWarehouseCode(orderSDO.getShippingWarehouseCode());
        orderBizQueryResponse.setShippingWarehouseName(orderSDO.getShippingWarehouseName());
        orderBizQueryResponse.setReceiveWareHouseName(orderSDO.getReceiveWareHouseName());
        orderBizQueryResponse.setReceiveWareHouseCode(orderSDO.getReceiveWareHouseCode());
        orderBizQueryResponse.setBusinessType(orderSDO.getBusinessType());
        orderBizQueryResponse.setBusinessTypeName(orderSDO.getBusinessTypeName());
        orderBizQueryResponse.setRemark(orderSDO.getRemark());
        //orderBizQueryResponse.setFeatures(orderSDO.getFeatures());
        orderBizQueryResponse.setOrderDetailList(orderSDO.getOrderDetailList());
        return orderBizQueryResponse;
    }

}
